import request from '@/utils/request'

/**
 * 容器列表
 * @param {
 * lpnCode	string
 * occupyStatus	integer($int32)
 * pageIndex	integer($int32)
 * pageSize	integer($int32)
 * purpose	string
 * warehouseAreaId
 * }
 * @returns {Array}
 */
export function getLpnPage(data) {
  return request({
    url: '/api/wms/lpn/page',
    method: 'post',
    data
  })
}

/**
 * 获取状态信息
 * @param {
 * }
 * @returns {Array}
 */
export function getLpnListPreOptions(data) {
  return request({
    url: '/api/wms/lpn/list_pre_options',
    method: 'get'
  })
}


/**
 * 新建容器
 * @param {
 * "category": "string",
 * "goodsOwnerId": 0,
 * "lpnCode": "string",
 * "lpnName": "string",
 * "memo": "string",
 * "occupyStatus": 0,
 * "occupyTaskCode": "string",
 * "occupyTaskId": 0,
 * "purpose": "string",
 * "quality": "string",
 * "specification": "string",
 * "status": 0,
 * "warehouseAreaCode": "string",
 * "warehouseAreaId": 0,
 * "warehouseAreaName": "string",
 * "warehouseId": 0,
 * "warehouseLocationCode": "string"
 * "warehouseLocationId": 0,
 * "warehouseLocationName": "string"
 * }
 * @returns {Array}
 */
export function lpnSave(data) {
  return request({
    url: '/api/wms/lpn/save',
    method: 'post',
    data
  })
}

/**
 * 批量更改容器状态
 * @param {
 * "lpnIdList": [ 0],
 * "occupyStatus": 0,
 * "status": 0
 * }
 * @returns {Array}
 */
export function lpnUpdateStatus(data) {
  return request({
    url: '/api/wms/lpn/update_status',
    method: 'post',
    data
  })
}

/**
 * 编辑容器
 * @param {
 * "category": "string",
 * "goodsOwnerId": 0,
 * "lpnCode": "string",
 * "lpnName": "string",
 * "memo": "string",
 * "occupyStatus": 0,
 * "occupyTaskCode": "string",
 * "occupyTaskId": 0,
 * "purpose": "string",
 * "quality": "string",
 * "specification": "string",
 * "status": 0,
 * "warehouseAreaCode": "string",
 * "warehouseAreaId": 0,
 * "warehouseAreaName": "string",
 * "warehouseId": 0,
 * "warehouseLocationCode": "string",
 * "warehouseLocationId": 0,
 * "warehouseLocationName": "string"
 * }
 * @returns {Array}
 */
export function lpnUpdate(data) {
  return request({
    url: '/api/wms/lpn/update',
    method: 'post',
    data
  })
}

/**
 * 编辑容器
 * @param {
 * "lpnId": 0,
 * }
 * @returns {Array}
 */
export function lpnDelete(data) {
  return request({
    url: '/api/wms/lpn/delete',
    method: 'post',
    data
  })
}
